/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package multimedia;

import MVC.IModel;

/**
 *
 * @author thomas
 */
public class MultimediaModel implements IModel {

    private int _myVolume;
    private String _myState;
    private boolean _isShuffle;
    private boolean _isRepeat;

    public MultimediaModel() {
        _myVolume = 0;
        _myState = "stop";
        
        _isShuffle = false;
        _isRepeat = false;
    }

    /**
     * @return the _myVolume
     */
    public int getVolume() {
        return _myVolume;
    }

    /**
     * @param myVolume the _myVolume to set
     */
    public void setVolume(int myVolume) {
        this._myVolume = myVolume;
    }

    /**
     * @return the _myState
     */
    public String getState() {
        return _myState;
    }

    /**
     * @param myState the _myState to set
     */
    public void setState(String myState) {
        this._myState = myState.toUpperCase();
        System.out.println("Change state --> " + _myState);
    }

    /**
     * @return the _isShuffle
     */
    public boolean isShuffle() {
        return _isShuffle;
    }

    /**
     * @param isShuffle the _isShuffle to set
     */
    public void isShuffle(boolean isShuffle) {
        this._isShuffle = isShuffle;
    }

    /**
     * @return the _isRepeat
     */
    public boolean isRepeat() {
        return _isRepeat;
    }

    /**
     * @param isRepeat the _isRepeat to set
     */
    public void isRepeat(boolean isRepeat) {
        this._isRepeat = isRepeat;
    }
    
    /**
     * Update the current model thanks to an playlist model
     * @param apm 
     */
    public void updateModel(AudioPlaylistModel apm) {
        _myState = apm.getState();
    }
}
